﻿using System;
using System.Collections.Generic;
using System.Text;
using TTClassLibrary;
using TTServer.Messages;
using libCommonClass;
using TTServer.Controller;
using libInterface;
using libUtilities;
using System.Drawing;
using bmttPPTController.TTServer;
using TTServer.Objects;

namespace TTServer.MessageProcessor
{
    public class PPTEnableBroadcastingRequestMessagepProcessor : IMessageProcessor
    {
        public bool Process(libCommonClass.TTMessage message, libInterface.IClientInfoProvider clientInfoProvider)
        {
            if (message is PPTEnableBroadcastingRequestMessage)
            {
                if (!(clientInfoProvider.Authority == AuthorityConstant.ADMIN
                    || clientInfoProvider.Authority == AuthorityConstant.KEY_MEMBER))
                {
                    return true;
                }

                ScreenshotBroadcastWithFeedback.TryToStart();

                return true;
            }

            return false;
        }

    }
}
